package c.x.jy.dao.dao;

import c.x.jy.dao.dto.OrderAwnserEntityDto;
import c.x.jy.dao.entity.OrderAwnserEntity;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 咨询内容表  包括 所有聊天记录，问题 咨询 记录
 * 
 * @author amwhyh
 * @email xxx@xx.com
 * @date 2021-05-25 10:50:05
 */
@Mapper
public interface OrderAwnserDao extends BaseMapper<OrderAwnserEntity> {

    @Select("select * from t_order_awnser  ${ew.customSqlSegment} order by create_date desc")
    IPage<OrderAwnserEntityDto> querypage(IPage<OrderAwnserEntity> page,@Param(Constants.WRAPPER) QueryWrapper<OrderAwnserEntity> query);

    @Select("select * from t_order_awnser  order by create_date desc")
    List<OrderAwnserEntity> all();
}

